Fix gailstatusbar problems
authorMatthias Clasen <mclasen@redhat.com>
Thu, 17 Feb 2011 02:58:10 +0000 (21:58 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 17 Feb 2011 02:58:10 +0000 (21:58 -0500)
Reported in https://bugzilla.gnome.org/show_bug.cgi?id=630971

modules/other/gail/gailstatusbar.c

index d3ebeead59f08daad06e79be646dd0aa2cdef9fe..02168624187667ebfadbe7e85d62b522fc68f253 100644 (file)
@@ -630,7 +630,21 @@ static GtkWidget*
 get_label_from_statusbar (GtkWidget *statusbar)
 {
   GtkWidget *message_area;
+  GList *children, *l;
+  GtkWidget *child;
 
   message_area = gtk_statusbar_get_message_area (GTK_STATUSBAR (statusbar));
-  return gtk_bin_get_child (GTK_BIN (message_area));
+
+  children = gtk_container_get_children (GTK_CONTAINER (message_area));
+  for (l = children; l; l = l->next)
+    {
+      child = l->data;
+      if (GTK_IS_LABEL (child))
+        break;
+      child = NULL;
+    }
+
+  g_list_free (children);
+
+  return child;
 }